﻿using System;

using Moe.ECamel.Common.Entities;

namespace Moe.ECamel.Common.Contracts
{
	/// <summary>
	/// Contract for item services.
	/// </summary>
	public interface IItemService : IECamelService
	{
		/// <summary>
		/// Searches for items matching the specified item.
		/// </summary>
		/// <param name="request"></param>
		/// <returns>Matching items.</returns>
		SearchItemsResponse SearchItems(SearchItemsRequest request);
		/// <summary>
		/// Creates a new item.
		/// </summary>
		/// <param name="item">Item details.</param>
		/// <returns>If successful - null, otherwise validation error.</returns>
		ECamelError CreateItem(Item item);
		/// <summary>
		/// Updates an item.
		/// </summary>
		/// <param name="item">Item details.</param>
		/// <returns>If successful - null, otherwise validation error.</returns>
		ECamelError UpdateItem(Item item);
	}
}